package com.yeban.bams.server.serversocket;

import java.io.Serializable;
import java.util.Arrays;

/**
 * @Desc 客户端请求信息对象
 * @Author yeban
 * @Date 2025/11/7
 */
public class RequestTO implements Serializable {

    private String methodName;      // 方法名
    private Object[] params;        // 形参数组
    private Class<?>[] paramTypes;     // 形参类型

    public RequestTO() {
    }

    public RequestTO(String methodName, Object[] params, Class<?>[] paramTypes) {
        this.methodName = methodName;
        this.params = params;
        this.paramTypes = paramTypes;
    }

    /**
     * 获取
     * @return methodName
     */
    public String getMethodName() {
        return methodName;
    }

    /**
     * 设置
     * @param methodName
     */
    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }

    /**
     * 获取
     * @return params
     */
    public Object[] getParams() {
        return params;
    }

    /**
     * 设置
     * @param params
     */
    public void setParams(Object[] params) {
        this.params = params;
    }

    /**
     * 获取
     * @return paramType
     */
    public Class<?>[] getParamTypes() {
        return paramTypes;
    }

    /**
     * 设置
     * @param paramTypes
     */
    public void setParamTypes(Class<?>[] paramTypes) {
        this.paramTypes = paramTypes;
    }

    @Override
    public String toString() {
        return "RequestTO{" +
                "methodName='" + methodName + '\'' +
                ", params=" + Arrays.toString(params) +
                ", paramType=" + Arrays.toString(paramTypes) +
                '}';
    }
}
